import request from "@/utils/request";

export function getGepartment() {
  return request({
    url: "/company/department"
  });
}

// 删除部门
export function delGepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: "DELETE"
  });
}
// 新增部门
export function addDepts(data) {
  return request({
    url: "/company/department",
    method: "post",
    data
  });
}

// 查询部门

export function editQuery(id) {
  return request({
    url: `/company/department/${id}`
  });
}

// 修改部门
export function editState(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: "put",
    data
  });
}
